package com.hp.siminterface.webservice.impl;

import java.util.List;

import com.hp.siminterface.domain.CellularSystemsPartition;
import com.hp.siminterface.persistence.CellularSystemsPartitionMapper;
import com.hp.siminterface.webservice.CellularSystemsPartitionService;

public class CellularSystemsPartitionServiceImpl implements
		CellularSystemsPartitionService {
	private CellularSystemsPartitionMapper cellularSystemsPartitionMapper;

	@Override
	public CellularSystemsPartition[] getCellularSystemsPartitionInfo() {
		List<CellularSystemsPartition> cellularSystemsPartitions = cellularSystemsPartitionMapper
				.selectCellularSystemsPartition();
		CellularSystemsPartition[] cellularSystemsPartitionArray = new CellularSystemsPartition[cellularSystemsPartitions
				.size()];
		int i = 0;

		for (CellularSystemsPartition cellularSystemsPartition : cellularSystemsPartitions) {
			cellularSystemsPartitionArray[i] = cellularSystemsPartition;
			i++;
		}
		return cellularSystemsPartitionArray;
	}

	public void setCellularSystemsPartitionMapper(
			CellularSystemsPartitionMapper cellularSystemsPartitionMapper) {
		this.cellularSystemsPartitionMapper = cellularSystemsPartitionMapper;
	}

}
